#ifndef __KALMAN_FILTER_H
#define __KALMAN_FILTER_H

#ifdef __cplusplus
extern "C"
{
#endif

typedef struct KalmanFilterStruct
{
    float prevData;       // 上一个数据
    float p, q, r, kGain; // q 过程噪声协方差 r 测量噪声协方差
} KFS;

float KalmanFilter(KFS *, float);

#ifdef __cplusplus
}
#endif

#endif // __KALMAN_FILTER_H
